package club.dmyang.controller;

import club.dmyang.common.enums.RespCodeEnums;
import club.dmyang.common.vo.ResposeVo;
import club.dmyang.service.FriendshipLinkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by brss on 2018/8/14.
 */
@RequestMapping("/friend")
@Controller
public class FriendshipLinkController {

    @Autowired
    private FriendshipLinkService friendshipLinkService;

    /**
     * 列出所有的友情链接
     * @return
     */
    @RequestMapping("/listall")
    @ResponseBody
    public ResposeVo listAllFriendLinks(){
        return new ResposeVo(RespCodeEnums.RESP_CODE_SUCC.getCode(),"查询成功",0,friendshipLinkService.listAll());
    }
}
